<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/27
 * Time: 11:31
 */

namespace app\common\model;


class User extends Base
{

    /**
     * @param array $userIds
     * @return false|\PDOStatement|string|\think\Collection
     */
    public function getUsersUserId($userIds = []){
        $data = [
            'id' => ['in', implode(',',$userIds)],
            'status' => 1,
        ];

        $order = [
          'id' => 'desc'
        ];
        return $this->where($data)->field(['id','username', 'image'])->order($order)->select();
    }

}